/*
 * COPYRIGHT:	2010 Christopher Smith, licenced under the GNU GPL v2; see COPYING in the top level directory
 * PROJECT:		sdedit
 * FILE:		netapi opts.cpp
 * PURPOSE:		netapi user options
 *				
 */

namespace Netapi
{

SDE_ENUM_VAL DsnameFlagsEnumVals[] = 
{
	{L"FORCE_REDISCOVERY", DS_FORCE_REDISCOVERY},
	{L"DIRECTORY_SERVICE_REQUIRED", DS_DIRECTORY_SERVICE_REQUIRED},
	{L"DIRECTORY_SERVICE_PREFERRED", DS_DIRECTORY_SERVICE_PREFERRED},
	{L"GC_SERVER_REQUIRED", DS_GC_SERVER_REQUIRED},
	{L"PDC_REQUIRED", DS_PDC_REQUIRED},
	{L"BACKGROUND_ONLY", DS_BACKGROUND_ONLY},
	{L"IP_REQUIRED", DS_IP_REQUIRED},
	{L"KDC_REQUIRED", DS_KDC_REQUIRED},
	{L"TIMESERV_REQUIRED", DS_TIMESERV_REQUIRED},
	{L"WRITABLE_REQUIRED", DS_WRITABLE_REQUIRED},
	{L"GOOD_TIMESERV_PREFERRED", DS_GOOD_TIMESERV_PREFERRED},
	{L"IS_FLAT_NAME", DS_IS_FLAT_NAME},
	{L"AVOID_SELF", DS_AVOID_SELF},
	{L"ONLY_LDAP_NEEDED", DS_ONLY_LDAP_NEEDED},
	{L"RETURN_DNS_NAME",  DS_RETURN_DNS_NAME},
	{L"RETURN_FLAT_NAME", DS_RETURN_FLAT_NAME}
};

SDE_ENUM DsnameFlagsEnum = 
{
	RTL_NUMBER_OF(DsnameFlagsEnumVals),
	DS_DIRECTORY_SERVICE_PREFERRED,
	DsnameFlagsEnumVals
};

SDE_ENUM_VAL AcctFilterEnumVals[] = 
{
	{L"TEMP_DUPLICATE", FILTER_TEMP_DUPLICATE_ACCOUNT},
	{L"NORMAL", FILTER_NORMAL_ACCOUNT},
	{L"INTERDOMAIN", FILTER_INTERDOMAIN_TRUST_ACCOUNT},
	{L"WORKSTATION", FILTER_WORKSTATION_TRUST_ACCOUNT},
	{L"SERVER", FILTER_SERVER_TRUST_ACCOUNT}
};

SDE_ENUM AcctFilterEnum = 
{
	RTL_NUMBER_OF(AcctFilterEnumVals),
	0,
	AcctFilterEnumVals
};

SDE_OPT StaticNetapiOptions[] = 
{
	{L"HOST", 0, SptString},
	{L"DOMAIN", 0, SptString},
	{L"DSNAME_FLAGS", SDE_OPT_SET, SptMultiEnumOr, &DsnameFlagsEnum},
	{L"ACCTFILTER", SDE_OPT_SET, SptMultiEnumOr, &AcctFilterEnum}
};

enum OptionIndex //synch with Options
{
	OiHost,
	OiDomain,
	OiGetDsName,
	OiAcctFilter
};

SDE_OPTS StaticNetapiOpts =
{
	RTL_NUMBER_OF(StaticNetapiOptions),
	StaticNetapiOptions
};

}//namespace Netapi
